﻿@model Site3AI.Models.QizSession

@{
    ViewBag.Title = "异常指标详情";
    int index = 0;
}

<h2>@Model.QizSubject.Title</h2>
<p>医院：@Model.QizSubject.Hospital.HospName</p>
<p>病区：@Model.QizSubject.Department.DepName</p>

<ul class="qizdetails quizlv1">
    @foreach (var QsdItem in Model.QizSessionDetails)
    {
        //只显示用于mobile的选项 --wenke 2014/2/23
        if (!QsdItem.QizSubjectDefine.IsAllowInMobile)
        {
            continue;
        }

        index++;
        
        if(QsdItem.ValueAutoEvaluation != "异常")
        {
            continue;   
        }

        int typeval = Convert.ToInt32(QsdItem.QizSubjectDefine.QizItem.TypeRef.OptionValue);

        if (typeval > 5)
        {
            continue;
        }
        
        <li class="quiz-item-body @(QsdItem.QizSubjectDefine.QizItem.RequiredItem ? "not-null" : "")">
            <span class="quiz-idx quizlv1">@(index). </span>            
            <span style="color:red;">
                @if (String.IsNullOrEmpty(QsdItem.QizSubjectDefine.ShortTitle))
                {
                    @Html.DisplayFor(model => QsdItem.QizSubjectDefine.QizItem.Title)
                }
                else
                {
                    @Html.DisplayFor(model => QsdItem.QizSubjectDefine.ShortTitle)
                }
            </span>

            <span>@Html.DisplayFor(model => QsdItem.QizSubjectDefine.QizItem.Unit)</span>
            <span>&nbsp;&nbsp;@Html.Raw(QsdItem.QizSubjectDefine.QizItem.Format)</span>
            <span><i>@QsdItem.QizSubjectDefine.QizItem.TypeRef.OptionTitle</i></span>
            @if (typeval < 3)
            {
                <span>@QsdItem.UserValue</span>
            }
            else if (typeval == 3)
            {
                DateTime dt = DateTime.MinValue;
                DateTime.TryParse(QsdItem.UserValue, out dt);
                <span>@dt.ToString("yyyy-MM-dd")</span>
            }
            else if (typeval == 4 || typeval == 5)
            {
                //CheckBox or RadioButton
            }
        </li>           
    }
</ul>
